#author: 金荣财
#dest: 打印100以内的斐波那契数列和打印斐波那契数据的第101项

#解题思路: 两个数，a在前，b在后，通过中间变量total，存储b后面那个值，然后再让a等于b，b等于total，依次前进
a = 1
b = 1
print(a, end=" ")

while b < 100:
    print(b, end=" ")
    total = a + b
    a = b
    b = total

#解题思路: 通过一个中间变量count，存储计算斐波那契数据的位置
a = 1
b = 1
count = 2

while count < 102:
    total = a + b
    a = b
    b = total
    count += 1
    if count == 101:
        print(b)
